/*
 * @Author: Troubadour 2276791354@qq.com
 * @Date: 2024-03-29 23:19:56
 * @LastEditors: Troubadour 2276791354@qq.com
 * @LastEditTime: 2024-04-11 19:22:10
 * @FilePath: \MDK-ARMf:\Study\STM32_Project\STM32HAL_Project\SmartDeskLamp\Module\DeskLamp\DeskLamp.c
 * @Description:
 */

#include "DeskLamp.h"



TASK_MODE_ENUM task_mode = MODE_AUTO;;
/* 久坐提醒时间设定 */
uint32_t LongSittingReminder = 30 * 1000;
uint32_t CntTimer;


void DeskLamp_Init(void)
{
    CntTimer = HAL_GetTick();
}

void DeskLamp_Thread(void)
{
    /* 3种模式 */
    switch (task_mode)
    {
    case MODE_AUTO:
        /* code */
        break;

    case MODE_MANUAL:
        /* code */
        break;

    case MODE_NIGHT:
        /* code */
        break;

    default:
        break;
    }

    /* 久坐提醒 */
    if ((HAL_GetTick() - CntTimer) > LongSittingReminder)
    {
        /* code */
    }
}


